package com.example.management.common.service

import com.example.management.common.domain.DictDO
import com.example.management.system.domain.UserDO


/**
 * 字典表
 *
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2017-09-29 18:28:07
 */
interface DictService {

    /**
     * 获取性别列表
     * @return
     */
    val sexList: List<DictDO>

    operator fun get(id: Long?): DictDO

    fun list(map: Map<String, Any>): List<DictDO>

    fun count(map: Map<String, Any>): Int

    fun save(dict: DictDO): Int

    fun update(dict: DictDO): Int

    fun remove(id: Long?): Int

    fun batchRemove(ids: Array<Long>): Int

    fun listType(): List<DictDO>

    fun getName(type: String, value: String): String

    /**
     * 获取爱好列表
     * @return
     * @param userDO
     */
    fun getHobbyList(userDO: UserDO): List<DictDO>

    /**
     * 根据type获取数据
     * @param map
     * @return
     */
    fun listByType(type: String): List<DictDO>

}
